<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:tiles="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8"/>
    <title th:fragment="title">入库历史</title>

    <link href="../../static/css/all.css" rel="stylesheet" type="text/css"/>
    <script src="../../static/js/main.js"></script>
</head>

<body>

<div class="content" tiles:fragment="content">
    <div class="content-nav">
        <div class="titleNav">
            <div class="title_nav title_nav_Now">
                <a>入库历史</a>
            </div>
        </div>
    </div>

    <div class="content-function">
        <button id="slide_panel_bt" class="icon-search"></button>
        <div class="myDivBt">
            <!--<a href="add/storage_form.html" th:href="@{/storage/add}">新建入库</a>-->
            <a id="btn1" href="#" onclick="jumpTo('/storage/addajax')">新建入库</a>
        </div>
    </div>

    <div class="content-query myInput slide-panel">
        <form id="storageQueryForm">
            <div class="content-query-left">
                <label>
                    操作人：
                    <input type="text" name="operationId"/>
                </label>
                <label>
                    最近多少天：
                    <input type="number" name="day" min="0"/>
                </label>
            </div>
            <div class="content-query-right">
                <input type="button" onclick="queryStorageList()" value="查询"/>
            </div>
        </form>
    </div>


    <div class="content-result myTable">
        <table id="result_storage_table">
            <tr>
                <th>入库单编号</th>
                <th>入库日期</th>
                <th>操作人员ID</th>
                <th>详情</th>
            </tr>
            <tr th:if="${history == null || history.empty}">
                <td colspan="4">没有入库历史</td>
            </tr>
            <!--/*@thymesVar id="history" type="java.util.List"*/-->
            <tr th:each="itemInOperation : ${history} ">
                <!--/*@thymesVar id="itemInOperation" type="com.repository.entity.ItemInOperationEntity"*/-->
                <td th:text="${itemInOperation.storageId}"></td>
                <td th:text="${#dates.format(itemInOperation.storageTime,'yyyy-MM-dd')}"></td>
                <!--yyyy-MM-dd ahh:mm:ss-->
                <!--<td th:text="${#dates(itemInOperation.storageTime).toLocaleString()}"></td>-->
                <td th:text="${itemInOperation.operationId}"></td>
                <td class="myTable-operation-info icon-info-circle"
                        th:onclick="'openPop_storageInfo(\''+${itemInOperation.storageId}+'\')'"></td>
            </tr>
        </table>
    </div>

    <div class="pop-bg">
        <div class="pop myTable" style="top: 5em;width: 65em;padding: 5em;height: 30em;">
            <div class="pop-close">
                <div class="close_button" onclick="closePop()">
                    <div class="close_button-icon"></div>
                </div>
            </div>
            <section style="text-align: center">
                <label style="float: left">入库单编号:"<span id="storage_id"></span></label>
                <label>入库人ID:<span id="operation_id"></span></label>
                <label style="float: right">入库日期:<span id="storage_time"></span></label>
            </section>
            <div>
                <table>
                    <thead>
                    <tr>
                        <th>物品条形码</th>
                        <th>入库数量</th>
                        <th>物品单价</th>
                        <th>发票编号</th>
                        <th>物品库位</th>
                        <th>物品批次信息</th>
                        <th>有效期限</th>
                        <th>可用数量</th>
                    </tr>
                    </thead>
                </table>
            </div>
            <div style="height: 27em;overflow-x:hidden;overflow-y: scroll;width: 66em">
                <table id="storage_table">
                    <tbody></tbody>
                </table>
            </div>
        </div>
    </div>
</div>

</body>
</html>